Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ListFrontends command #1123

Merged
merged 1 commit into from
Aug 1, 2024
Merged

fix ListFrontends command #1123

merged 1 commit into from
Aug 1, 2024

Conversation

Keksoj
Copy link
Member

@Keksoj Keksoj commented Aug 1, 2024

This command was omitted when refactoring the main process event loop, and would yield:

sozu -c sozu.toml frontend list

Logs will be sent to stdout
Access logs will be sent to Some("stdout")
2024-08-01T07:48:10.897998Z 1722498490897998395 9733 DEBUG CTL	sozu::ctl	applying timeout 15s
2024-08-01T07:48:10.898016Z 1722498490898016569 9733 DEBUG CTL	sozu::ctl	Executing command Frontend { cmd: List { http: false, https: false, tcp: false, domain: None } }
2024-08-01T07:48:10.898024Z 1722498490898024284 9733 DEBUG CTL	sozu::ctl::request_builder	Listing frontends

Request failed: main process could not list frontends

This PR adds the missing lines when dispatching a command on the main process.

Now the result is as awaited:

sozu -c sozu.toml frontend list                                                                                                                                                                                                                                                               09:50
Logs will be sent to stdout
Access logs will be sent to Some("stdout")
2024-08-01T07:50:53.037670Z 1722498653037670688 17130 DEBUG CTL	sozu::ctl	applying timeout 15s
2024-08-01T07:50:53.037685Z 1722498653037685386 17130 DEBUG CTL	sozu::ctl	Executing command Frontend { cmd: List { http: false, https: false, tcp: false, domain: None } }
2024-08-01T07:50:53.037693Z 1722498653037693872 17130 DEBUG CTL	sozu::ctl::request_builder	Listing frontends
Success: Successfully listed frontends
┌─────────────────┬──────────────┬───────────┬──────────────────────────────────────────────┬────────┬──────────┬───────────────────┐
│ HTTP frontends  │              │           │                                              │        │          │                   │
├─────────────────┼──────────────┼───────────┼──────────────────────────────────────────────┼────────┼──────────┼───────────────────┤
│ cluster_id      │ address      │ hostname  │ path                                         │ method │ position │ tags              │
├─────────────────┼──────────────┼───────────┼──────────────────────────────────────────────┼────────┼──────────┼───────────────────┤
│ MyCluster       │ 0.0.0.0:1080 │ localhost │ PathRule { kind: Prefix, value: "" }         │ None   │ 0        │ owner-id=emmanuel │
├─────────────────┼──────────────┼───────────┼──────────────────────────────────────────────┼────────┼──────────┼───────────────────┤
│ MyCluster       │ 0.0.0.0:1080 │ localhost │ PathRule { kind: Prefix, value: "/api" }     │ None   │ 0        │ owner-id=emmanuel │
├─────────────────┼──────────────┼───────────┼──────────────────────────────────────────────┼────────┼──────────┼───────────────────┤
│ MyCluster       │ 0.0.0.0:1080 │ localhost │ PathRule { kind: Prefix, value: "/latency" } │ None   │ 0        │ owner-id=emmanuel │
└─────────────────┴──────────────┴───────────┴──────────────────────────────────────────────┴────────┴──────────┴───────────────────┘

@Keksoj Keksoj merged commit 57399e0 into main Aug 1, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants